<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:id="@+id/constraint_view">

    <androidx.constraintlayout.widget.ConstraintLayout
        android:id="@+id/linearLayout"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:background="@color/colorPrimaryDark"
        android:orientation="horizontal"
        android:paddingBottom="8dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent">

        <TextView
            android:id="@+id/progressTime"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginStart="16dp"
            android:text="@string/zero"
            android:minWidth="40dp"
            android:textColor="@android:color/white"
            app:layout_constraintBottom_toBottomOf="@+id/chapterView"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toTopOf="@+id/chapterView" />

        <TextView
            android:id="@+id/chapterView"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            android:layout_marginStart="8dp"
            android:layout_marginTop="8dp"
            android:ellipsize="end"
            android:gravity="center"
            android:maxLines="1"
            android:scrollHorizontally="true"
            android:textColor="@android:color/white"
            android:textSize="18sp"
            app:layout_constraintEnd_toStartOf="@+id/chapterTime"
            app:layout_constraintStart_toEndOf="@+id/progressTime"
            app:layout_constraintTop_toTopOf="parent"
            tools:text="Chapter" />

        <TextView
            android:id="@+id/chapterTime"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginEnd="16dp"
            android:text="@string/zero"
            android:minWidth="40dp"
            android:textColor="@android:color/white"
            app:layout_constraintBottom_toBottomOf="@+id/chapterView"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintTop_toTopOf="@+id/chapterView" />

        <SeekBar
            android:id="@+id/seekBar"
            android:layout_width="0dp"
            android:layout_height="wrap_content"
            android:layout_marginEnd="8dp"
            android:layout_marginStart="8dp"
            android:layout_marginTop="8dp"
            android:foregroundTint="@android:color/white"
            android:progressTint="@android:color/white"
            android:thumbTint="@android:color/white"
            app:layout_constraintEnd_toEndOf="parent"
            app:layout_constraintStart_toStartOf="parent"
            app:layout_constraintTop_toBottomOf="@+id/chapterView" />

    </androidx.constraintlayout.widget.ConstraintLayout>


    <ImageView
        android:id="@+id/imageView"
        android:layout_width="0dp"
        android:layout_height="0dp"
        android:layout_centerHorizontal="true"
        android:adjustViewBounds="true"
        android:cropToPadding="true"
        android:scaleType="fitCenter"
        app:layout_constraintBottom_toTopOf="@+id/controls"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toBottomOf="@+id/linearLayout"
        android:background="@color/colorPrimaryDark"
        android:contentDescription="TODO" />


    <LinearLayout
        android:id="@+id/controls"
        android:layout_width="0dp"
        android:layout_height="70dp"
        android:background="@color/colorPrimaryDark"
        android:gravity="center_vertical|center_horizontal"
        android:orientation="horizontal"
        android:paddingBottom="10dp"
        android:paddingTop="10dp"
        android:weightSum="5"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent">



        <ImageButton
            android:id="@+id/prev_chapter"
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:layout_weight="1"
            android:background="@android:color/transparent"
            android:scaleType="fitCenter"
            android:src="@drawable/ic_skip_previous_white_24dp"
            android:contentDescription="TODO" />

        <ImageButton
            android:id="@+id/fast_back"
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:layout_weight="1"
            android:background="@android:color/transparent"
            android:scaleType="fitCenter"
            android:src="@drawable/baseline_replay_10_white_24"
            android:contentDescription="TODO" />


        <ImageButton
            android:id="@+id/play_pause"
            android:layout_width="50dp"
            android:layout_height="50dp"
            android:layout_weight="1"
            android:background="@android:color/transparent"
            android:scaleType="fitCenter"
            android:src="@drawable/ic_play_arrow_white_24dp"
            android:contentDescription="TODO" />

        <ImageButton
            android:id="@+id/fast_forward"
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:layout_weight="1"
            android:background="@android:color/transparent"
            android:scaleType="fitCenter"
            android:src="@drawable/baseline_forward_10_white_24"
            android:contentDescription="TODO" />

        <ImageButton
            android:id="@+id/next_chapter"
            android:layout_width="30dp"
            android:layout_height="30dp"
            android:layout_weight="1"
            android:background="@android:color/transparent"
            android:scaleType="fitCenter"
            android:src="@drawable/ic_skip_next_white_24dp"
            android:contentDescription="TODO" />


    </LinearLayout>

</androidx.constraintlayout.widget.ConstraintLayout>